home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr45
/
pixelv10.zip
/
PIXELV1.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-10-17
|
11KB
|
210 lines
DECLARE SUB whereBegin ()
DECLARE SUB titleScreen ()
DECLARE SUB inputPath ()
titleScreen
'InputPath**************************************************************
mustBeLessThan:
LOCATE 10, 10
COLOR 15
PRINT "Please enter the filename"
LOCATE 11, 10
PRINT "of the file you'd like to"
LOCATE 12, 10
PRINT "create."
INPUT fileName$
IF fileName$ = "EXIT" OR fileName$ = "exit" OR fileName$ = "Exit" THEN SYSTEM
IF LEN(fileName$) > 12 THEN CLS : GOTO mustBeLessThan
CLS
'WhereBegin***********************************************************
SCREEN 2
PRINT "Please move the cursor to where you want your picture's"
PRINT "drawing to begin. Use the arrow keys to move the cursor"
PRINT "and press the space bar to begin there. (Press any key)"
go2: go2$ = INKEY$
IF go2$ = "" THEN GOTO go2
SCREEN 7
col = 0
row = 0
PSET (0!, 0!), 4
redoit:
mover$ = INKEY$
IF mover$ = "" THEN GOTO redoit
PSET (col, row), 0
IF mover$ = CHR$(0) + "H" AND row > 0 THEN row = row - 1
IF mover$ = CHR$(0) + "P" AND row < 199 THEN row = row + 1
IF mover$ = CHR$(0) + "K" AND col > 0 THEN col = col - 1
IF mover$ = CHR$(0) + "M" AND col < 319 THEN col = col + 1
PSET (col, row), 4
IF mover$ = CHR$(32) THEN GOTO begin2
GOTO redoit
begin2:
OPEN fileName$ FOR OUTPUT AS #1
PRINT #1, "SCREEN 7"
PRINT #1, "PSET ("; col; ","; row; "), 0"
PRINT #1, "DRAW "; CHR$(34); "";
PSET (col, row), 0
'Go!**************************************************************************
'First, the variables:
egaColor = 1
howLong = 1
colorBar = 1
begin:
pixel$ = INKEY$
IF pixel$ = "" THEN GOTO begin
'*****************************************************************************
IF pixel$ = CHR$(32) THEN GOTO moveit
IF pixel$ = CHR$(27) THEN SYSTEM
IF pixel$ = "f" OR pixel$ = "F" THEN GOTO fill
'*****************************************************************************
IF pixel$ = CHR$(9) AND colorBar = 1 THEN colorBar = 2: GOTO begin
IF pixel$ = CHR$(9) AND colorBar = 2 THEN colorBar = 1: GOTO begin
IF colorBar = 1 AND pixel$ = "1" THEN egaColor = 1: GOTO coloring
IF colorBar = 1 AND pixel$ = "2" THEN egaColor = 2: GOTO coloring
IF colorBar = 1 AND pixel$ = "3" THEN egaColor = 3: GOTO coloring
IF colorBar = 1 AND pixel$ = "4" THEN egaColor = 4: GOTO coloring
IF colorBar = 1 AND pixel$ = "5" THEN egaColor = 5: GOTO coloring
IF colorBar = 1 AND pixel$ = "6" THEN egaColor = 6: GOTO coloring
IF colorBar = 1 AND pixel$ = "7" THEN egaColor = 7: GOTO coloring
IF colorBar = 1 AND pixel$ = "8" THEN egaColor = 8: GOTO coloring
IF colorBar = 1 AND pixel$ = "9" THEN egaColor = 9: GOTO coloring
IF colorBar = 1 AND pixel$ = "0" THEN egaColor = 0: GOTO coloring
IF colorBar = 2 AND pixel$ = "0" THEN egaColor = 10: GOTO coloring
IF colorBar = 2 AND pixel$ = "1" THEN egaColor = 11: GOTO coloring
IF colorBar = 2 AND pixel$ = "2" THEN egaColor = 12: GOTO coloring
IF colorBar = 2 AND pixel$ = "3" THEN egaColor = 13: GOTO coloring
IF colorBar = 2 AND pixel$ = "4" THEN egaColor = 14: GOTO coloring
IF colorBar = 2 AND pixel$ = "5" THEN egaColor = 15: GOTO coloring
'*****************************************************************************
IF pixel$ = "=" OR pixel$ = "+" AND howLong < 6 THEN howLong = howLong + 1: GOTO begin
IF pixel$ = "-" OR pixel$ = "_" AND howLong > 1 THEN howLong = howLong - 1: GOTO begin
'*****************************************************************************
IF pixel$ = CHR$(0) + "H" AND howLong = 1 THEN DRAW "U1": PRINT #1, "U1";
IF pixel$ = CHR$(0) + "P" AND howLong = 1 THEN DRAW "D1": PRINT #1, "D1";
IF pixel$ = CHR$(0) + "K" AND howLong = 1 THEN DRAW "L1": PRINT #1, "L1";
IF pixel$ = CHR$(0) + "M" AND howLong = 1 THEN DRAW "R1": PRINT #1, "R1";
IF pixel$ = CHR$(0) + "H" AND howLong = 2 THEN DRAW "U2": PRINT #1, "U2";
IF pixel$ = CHR$(0) + "P" AND howLong = 2 THEN DRAW "D2": PRINT #1, "D2";
IF pixel$ = CHR$(0) + "K" AND howLong = 2 THEN DRAW "L2": PRINT #1, "L2";
IF pixel$ = CHR$(0) + "M" AND howLong = 2 THEN DRAW "R2": PRINT #1, "R2";
IF pixel$ = CHR$(0) + "H" AND howLong = 3 THEN DRAW "U3": PRINT #1, "U3";
IF pixel$ = CHR$(0) + "P" AND howLong = 3 THEN DRAW "D3": PRINT #1, "D3";
IF pixel$ = CHR$(0) + "K" AND howLong = 3 THEN DRAW "L3": PRINT #1, "L3";
IF pixel$ = CHR$(0) + "M" AND howLong = 3 THEN DRAW "R3": PRINT #1, "R3";
IF pixel$ = CHR$(0) + "H" AND howLong = 4 THEN DRAW "U4": PRINT #1, "U4";
IF pixel$ = CHR$(0) + "P" AND howLong = 4 THEN DRAW "D4": PRINT #1, "D4";
IF pixel$ = CHR$(0) + "K" AND howLong = 4 THEN DRAW "L4": PRINT #1, "L4";
IF pixel$ = CHR$(0) + "M" AND howLong = 4 THEN DRAW "R4": PRINT #1, "R4";
IF pixel$ = CHR$(0) + "H" AND howLong = 5 THEN DRAW "U5": PRINT #1, "U5";
IF pixel$ = CHR$(0) + "P" AND howLong = 5 THEN DRAW "D5": PRINT #1, "D5";
IF pixel$ = CHR$(0) + "K" AND howLong = 5 THEN DRAW "L5": PRINT #1, "L5";
IF pixel$ = CHR$(0) + "M" AND howLong = 5 THEN DRAW "R5": PRINT #1, "R5";
IF pixel$ = CHR$(0) + "H" AND howLong = 6 THEN DRAW "U10": PRINT #1, "U10";
IF pixel$ = CHR$(0) + "P" AND howLong = 6 THEN DRAW "D10": PRINT #1, "D10";
IF pixel$ = CHR$(0) + "K" AND howLong = 6 THEN DRAW "L10": PRINT #1, "L10";
IF pixel$ = CHR$(0) + "M" AND howLong = 6 THEN DRAW "R10": PRINT #1, "R10";
GOTO begin
'*****************************************************************************
coloring:
IF egaColor = 0 THEN DRAW "C0"
IF egaColor = 1 THEN DRAW "C1"
IF egaColor = 2 THEN DRAW "C2"
IF egaColor = 3 THEN DRAW "C3"
IF egaColor = 4 THEN DRAW "C4"
IF egaColor = 5 THEN DRAW "C5"
IF egaColor = 6 THEN DRAW "C6"
IF egaColor = 7 THEN DRAW "C7"
IF egaColor = 8 THEN DRAW "C8"
IF egaColor = 9 THEN DRAW "C9"
IF egaColor = 10 THEN DRAW "C10"
IF egaColor = 11 THEN DRAW "C11"
IF egaColor = 12 THEN DRAW "C12"
IF egaColor = 13 THEN DRAW "C13"
IF egaColor = 14 THEN DRAW "C14"
IF egaColor = 15 THEN DRAW "C15"
PRINT #1, "C"; egaColor; "";
GOTO begin
moveit:
DIM wholeScreen(1 TO 10000)
GET (0!, 0!)-(319!, 199!), wholeScreen
PSET (159!, 99!), 0
col = 159
row = 99
moving:
move$ = INKEY$
PSET (col, row), 12
PSET (col, row), 14
IF move$ = "" THEN GOTO moving
IF move$ = CHR$(0) + "H" AND row > 0 THEN row = row - 1
IF move$ = CHR$(0) + "P" AND row < 199 THEN row = row + 1
IF move$ = CHR$(0) + "K" AND col > 0 THEN col = col - 1
IF move$ = CHR$(0) + "M" AND col < 319 THEN col = col + 1
IF move$ = CHR$(32) THEN GOTO done
PSET (col, row), 12
PSET (col, row), 14
GOTO moving
done:
PUT (0!, 0!), wholeScreen, PSET
PSET (col, row), 0
PRINT #1, "BM"; col; ","; row; "";
GOTO begin
fill:
DIM wholeScreen2(1 TO 10000)
GET (0!, 0!)-(319!, 199!), wholeScreen2
PSET (159!, 99!), 0
moving2:
move2$ = INKEY$
PSET (col, row), 12
PSET (col, row), 14
IF move2$ = "" THEN GOTO moving2
IF move2$ = CHR$(0) + "H" AND row > 0 THEN row = row - 1
IF move2$ = CHR$(0) + "P" AND row < 199 THEN row = row + 1
IF move2$ = CHR$(0) + "K" AND col > 0 THEN col = col - 1
IF move2$ = CHR$(0) + "M" AND col < 319 THEN col = col + 1
IF move2$ = CHR$(32) THEN GOTO redoFill
PSET (col, row), 12
PSET (col, row), 14
GOTO moving2
redoFill:
LOCATE 1, 1
PRINT "Enter the color number"
PRINT "of the color the border"
PRINT "around the fill space is."
INPUT borderColor
IF borderColor < 0 OR borderColor > 15 THEN GOTO redoFill
PUT (0!, 0!), wholeScreen2, PSET
PAINT (col, row), egaColor, borderColor
PRINT #1, "P"; egaColor; ","; borderColor; "";
PSET (159!, 99!), 0
GOTO begin
'*****************************************************************************
'*****************************************************************************
'*****************************************************************************
SUB titleScreen
DEF SEG = 0
CAPS% = PEEK(&H417)
POKE &H417, (CAPS% XOR &H40)
SCREEN 7
'The following title screen picture were created using this program.
PSET (37, 88), 0
DRAW "C 4 U10U10U10U10U10U10U10U10R10R10R10R10R10D10D10D10D10L10L10L10L10D10D10D10D10L10BM 103 , 88 C 4 U10U10U10U10U10U10U10U10R10D10D10D10D10D10D10D10D10L10BM 129 , 88 C 4 U10R10U10R10U10U10U10L10U10L10U10U10R10D10R10D10R10D10R10U10R10U10R10U10R10D10D10L10D10L10D10D10D10R10D10R10D10L10L10U10L10U10U10L10D10D10L10D10L10L10U1R1C12R1P12,4BM 214 , 88 C 4 U10U10U10U10U10U10U10U10R10R10R10D10L10L10D10D10D10R10D10L10D10D10R10R10R10D10L10L10L10L10"
DRAW "BM 244 , 78 C 4 D10C 0 R10U10L10C 4 D1D1D1D1D1D1D1D1D1D1BM 259 , 88 C 4 U10U10U10U10U10U10U10U10R10D10D10D10D10D10D10D10R10R10D10L10L10L10U1R1C12R1P12,4BM 41 , 87 C 12 U10P 12 , 4 BM 108 , 86 P 12 , 4 P 12 , 4 BM 216 , 87 P 12 , 4 R10P 12 , 4 BM 69 , 100 C 10 D10D10D10D10U10U10U10U10R10R10D10L10L10BM 93 , 100 D10C 10 U10D10D10D10D10U10U10U10R10U10L10R10D10D10D10D10BM 106 , 100 C 10 D10C 10 C 0 U10C 10 C 0 R1C 10 D10D10D10D10"
DRAW "BM 111 , 100 C 10 D10D10D10D10U10U10U10U10R10D10D10R10U10U10D10D10D10D10BM 135 , 100 C 10 R10R10L10D10D10D10D10BM 159 , 100 C 10 D10D10D10D10R10R10L10L10U10U10R10L10U10U10R10R10BM 183 , 100 C 10 D10D10D10D10U10U10U10U10R10R10D10L10L10R10D10R10D10D10BM 186 , 122 C 3 D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1D1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1R1U1BM 237 , 123 C 3 U1BM 244 , 122 C 3 D4D4D4D4D4D4D1D1"
DRAW "BM 252 , 148 C 3 R1U1L1BM 261 , 122 C 3 D1L1D10D10D1D1D1D1R1D1R1R1R1R1R1R1R1R1R1R1R1R1R1R1R1U1R1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1U1L1U1L1L1L1L1L1L1L1L1L1L1L1L1L1L1BM 84 , 168 C 15 R10R10R10R10R10D1R1R10R10R10R10D1R1R10R10R10D1R1R10R10D1R1R10D4C 15 L5L5L2C 0 D1U1R1C 15 D1L10L10L1D1L10L10L10L1D1L10L10L10L10L1D1L10L10L10L10L10U10U1R1C6R1P 6 , 15 BM 239 , 172 C 7 U1R1U1R1R1R1R1R1R1R1D1R1R1D1R1D1R1R1R1D1R1R1R1L1L1L1L1D1L1L1R1R1R1L1L1L1D1L1D1L1L1D1L1L1L1L1L1L1L1U1L1U1U1U1U1R1C 8 R1P 8 , 7"
DRAW "BM 256 , 175 C 1 D1D1L1D1D1D1L1D1D1D1R1D1R1D1R1U1R1U1U1R1U1U1L1U1L1U1L1U1U1R1D1D1L1D1D1L1D1D1R1D1R1U1U1U1R1D1L1L1U1U1U1U1U1U1U1L1L1L1D1L1L1D1L1L1D1L1R1U1R1U1R1U1R1U1R1L1U1L1U1L1U1L1D1R1D1R1D1L1L1U1L1U1U1L1L1D1R1BM 15 , 180 C 12 U1U1U1U1U1U1R1R1D1D1D1R1U1U1U1R1D1C 10 U1C 0 D1U1C 12 R1D1D1D1D1D1D1R1R1U1U1U1U1U1R1U1R1R1D1R1D1D1D1D1D1U1U1L1L1L1R1R1R1R1R1D1D1R1R1R1U1U1U1U1U1U1R1R1R1R1R1R1L1L1L1D1D1D1D1D1D1U1U1U1R1R1R1L1L1L1D1D1D1R1R1R1R1R1R1R1R1R1U1U1U1L1L1L1U1U1U1R1R1R1R1R1R1R1R1R1R1L1L1D1D1D1D1D1D1R1R1R1R1R1R1R1U1U1U1L1U1L1U1L1U1D1R1D1R1D1R1R1U1R1U1R1U1"
go: go$ = INKEY$
IF go$ = "" THEN GOTO go
CLS
END SUB